package models

import (
	"github.com/goravel/framework/database/orm"
	"goravel/app/models/common"
)

type Menu struct {
	orm.Model
	Pid        uint        `gorm:"column:pid;default:null" json:"pid" form:"pid"`
	Path       string      `gorm:"column:path" json:"path" form:"path"`
	Component  string      `gorm:"column:component" json:"component" form:"component"`
	Name       string      `gorm:"column:name" json:"name" form:"name"`
	Meta       common.Meta `gorm:"column:meta;" json:"meta" form:"meta"`
	Redirect   string      `gorm:"column:redirect" json:"redirect" form:"redirect"`
	Permission Permission  `gorm:"-" json:"permission" form:"permission"`
	Children   []Menu      `gorm:"foreignKey:id" json:"children" form:"children"`
}
